﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Threading.Tasks;

namespace Infrastructure.Core.Loging
{
    /// <summary>
    /// 
    /// </summary>
    public class LogDo
    {

        public LogDo(String logLevel, String title, String content)
        {
            this.LogLevel = logLevel;
            this.Title = title;
            this.Content = content;
            this.LogDate = DateTime.Now.ToString("yyyyMMdd");
            this.LogHour = DateTime.Now.ToString("yyyyMMddHH");
            this.CreateTime = DateTime.Now;
        }

        /// <summary>
        /// 唯一id
        /// </summary>
        //public virtual ObjectId Id { get; set; }
        /// <summary>
        /// 应用号
        /// </summary>
        public virtual String AppId { get; set; }
        /// <summary>
        /// 日志日期：yyyyMMdd
        /// </summary>
        public virtual String LogDate { get; set; }
        /// <summary>
        /// 日志小时：yyyyMMddHH
        /// </summary>
        public virtual String LogHour { get; set; }
        /// <summary>
        /// Info|Warn|Error|Exception
        /// </summary>
        public virtual String LogLevel { get; set; }
        /// <summary>
        /// 日志标题
        /// </summary>
        public virtual String Title { get; set; }
        /// <summary>
        /// 日志内容
        /// </summary>
        public virtual String Content { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime CreateTime { get; set; }
    }
}
